# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=cproc
pkgver=0_git20230502
_commit=0985a7893a4b5de63a67ebab445892d9fffe275b
pkgrel=0
pkgdesc="A C11 compiler based on the QBE compiler backend"
url="https://sr.ht/~mcf/cproc"
arch="x86_64 aarch64" # See https://github.com/michaelforney/cproc#supported-targets
license="ISC AND MIT AND Unlicense"
depends="binutils qbe cmd:cpp"
subpackages="$pkgname-doc"
source="$pkgname-$_commit.tar.gz::https://github.com/michaelforney/cproc/archive/$_commit.tar.gz"
builddir="$srcdir/$pkgname-$_commit"

build() {
	./configure \
		--host=$CHOST \
		--target=$CTARGET \
		--prefix=/usr \
		--with-cpp=cpp
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
cbc38f304ac1d12c691c42cd67a6229f6ae6549a1270be17857b72ee1817d9c167d5e7bbe58f266cf56ee848453da923b1d910d660ee24abc3d5ed54b955035e  cproc-0985a7893a4b5de63a67ebab445892d9fffe275b.tar.gz
"
